#ifndef DDAS_DEFINITIONS_H
#define DDAS_DEFINITIONS_H

#define CREDIT_PER_RESULT 1.0
#define SSE_RELATIVE_TOLERANCE 0.1

#define DDAS_RESULT_URL "/home/boinc/projects/ddas/html/results/"
#define WU_TEMPLATE_URL "/home/boinc/projects/ddas/templates/ddas_wu"
#define PROBLEM_PATH "/home/boinc/projects/ddas/problem"
#define WORKUNIT_DIMENSION 500000000l
#define DESIRED_WU_CUSHION 1000

#define DBHOST "localhost"
#define DDAS "ddas"
#define USERNAME "boinc"
#define PASSWD "border8max"
#define SCIENCE "science"
#define DBNAME "ddas"

///A struct to hold the regression coefficients for a given result
struct REGRESSION_COEFFICIENTS
{
        //which column are talking about
        int*            index;

        //the value of the linear coefficient
        double*         values;

        //the size of the struct
        unsigned int    size;
};


///A struct used to hold the client result data
struct DDAS_CLIENT_RESULT_DATA
{
        /// The binary representation of the definition number - serves to disambiguate endianess
        char**          bin_reps;

        /// The decimal representation of the combination of independent variables used in this regression (1011 base 2 == 11 base 10)
        char**          def_nums;

        /// The sum of squared error for the linear regression
        double*         SSEs;

        /// How many results are contained in the struct
        unsigned int   size;

        //regression coefficients
        REGRESSION_COEFFICIENTS* coefficients;
};

#endif
